<?php

namespace App\Http\Controllers\admin;

use App\Dao\CommonDao;
use App\Model\WithdrawalModel;
use App\Services\Code;

class WithController
{
    public function withs(){
        if(getIsHasPage()){
            return Code::message('',200,WithdrawalModel::query()->orderByDesc('created_at')->paginate());
        }
        return view('admin.bills.withs');
    }

    public function confirm(): array
    {
        CommonDao::confirmWiths(request()->all());
        return Code::message();
    }
}
